package com.rui.patterns.reponsobility;

/**
 * @author : [锐神NO.3]
 * @version : [v1.0]
 * @className : Client
 * @createTime : [2022/2/24 14:26]
 * @description : [描述该类的功能]
 */

public class Client {
    public static void main(String[] args) {
        LeaveRequest leave = new LeaveRequest("小明", 1, "身体不适");

        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        GeneralManager generalManager = new GeneralManager();

        //设置处理者链
        groupLeader.setNextHandler(manager);
        manager.setNextHandler(generalManager);

        //处理请假申请
        groupLeader.submit(leave);
    }
}
